//
//  Dc_FCTableViewCell.m
//  艾薇贝儿
//
//  Created by dllo on 15/9/7.
//  Copyright (c) 2015年 dllo－－邴鹏超. All rights reserved.
//

#import "Dc_FCTableViewCell.h"
#import "UIImageView+WebCache.h"
#import "AppDelegate.h"

@implementation Dc_FCTableViewCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _image=[[UIImageView alloc]initWithFrame:CGRectMake(30*OffWidth, 0, 315*OffWidth, 90*OffHeight)];
        [_image setBackgroundColor:[UIColor lightGrayColor]];
        [self.contentView addSubview:_image];
        
        
        _nameLabel=[[UILabel alloc]initWithFrame:CGRectMake(30*OffWidth, 95*OffHeight,100*OffWidth , 35*OffHeight)];
        _nameLabel.textAlignment=1;
       [_nameLabel setAlpha:0.6];
     //   [_nameLabel setBackgroundColor:[UIColor blackColor]];
        _nameLabel.textColor=[UIColor blackColor];
        [self.contentView addSubview:_nameLabel];
        
        
        _descLabel=[[UILabel alloc]initWithFrame:CGRectMake(130*OffWidth, 100*OffHeight, 200*OffWidth, 20*OffHeight)];
   //   [_descLabel setBackgroundColor:[UIColor blackColor]];
        [_descLabel setAlpha:0.5];
        _descLabel.textAlignment=1;
        _descLabel.textColor=[UIColor blackColor];
        [self.contentView addSubview:_descLabel];
        
    }
    return self;
}
-(void)model:(DcFirstModel *)model{
 //   [_image sd_setImageWithURL:[NSURL URLWithString:model.picUrl]];
    _nameLabel.text=model.name;
    _descLabel.text=model.desc;
    [_image  sd_setImageWithURL:[NSURL  URLWithString:model.picUrl] placeholderImage:[UIImage imageNamed:@"jia.jpg"]];

}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
